package com.muyu.danmo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.danmo.mapper.DanmoAncientDynastiesMapper;
import com.muyu.danmo.domain.DanmoAncientDynasties;
import com.muyu.danmo.service.IDanmoAncientDynastiesService;

/**
 * 古代朝代Service业务层处理
 * 
 * @author yangle
 * @date 2024-09-21
 */
@Service
public class DanmoAncientDynastiesServiceImpl implements IDanmoAncientDynastiesService 
{
    @Autowired
    private DanmoAncientDynastiesMapper danmoAncientDynastiesMapper;

    /**
     * 查询古代朝代
     * 
     * @param id 古代朝代主键
     * @return 古代朝代
     */
    @Override
    public DanmoAncientDynasties selectDanmoAncientDynastiesById(Long id)
    {
        return danmoAncientDynastiesMapper.selectDanmoAncientDynastiesById(id);
    }

    /**
     * 查询古代朝代列表
     * 
     * @param danmoAncientDynasties 古代朝代
     * @return 古代朝代
     */
    @Override
    public List<DanmoAncientDynasties> selectDanmoAncientDynastiesList(DanmoAncientDynasties danmoAncientDynasties)
    {
        return danmoAncientDynastiesMapper.selectDanmoAncientDynastiesList(danmoAncientDynasties);
    }

    /**
     * 新增古代朝代
     * 
     * @param danmoAncientDynasties 古代朝代
     * @return 结果
     */
    @Override
    public int insertDanmoAncientDynasties(DanmoAncientDynasties danmoAncientDynasties)
    {
        return danmoAncientDynastiesMapper.insertDanmoAncientDynasties(danmoAncientDynasties);
    }

    /**
     * 修改古代朝代
     * 
     * @param danmoAncientDynasties 古代朝代
     * @return 结果
     */
    @Override
    public int updateDanmoAncientDynasties(DanmoAncientDynasties danmoAncientDynasties)
    {
        return danmoAncientDynastiesMapper.updateDanmoAncientDynasties(danmoAncientDynasties);
    }

    /**
     * 批量删除古代朝代
     * 
     * @param ids 需要删除的古代朝代主键
     * @return 结果
     */
    @Override
    public int deleteDanmoAncientDynastiesByIds(Long[] ids)
    {
        return danmoAncientDynastiesMapper.deleteDanmoAncientDynastiesByIds(ids);
    }

    /**
     * 删除古代朝代信息
     * 
     * @param id 古代朝代主键
     * @return 结果
     */
    @Override
    public int deleteDanmoAncientDynastiesById(Long id)
    {
        return danmoAncientDynastiesMapper.deleteDanmoAncientDynastiesById(id);
    }
}
